package com.fs.controller;

import com.fs.annotation.SysLog;
import com.fs.pojo.UserAddrFlag;
import com.fs.service.SysLogService;
import com.fs.vo.PageResult;
import com.fs.vo.SysResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@Api(tags = "系统日志")
@RestController
@RequestMapping("/sysLog")
public class SysLogController {
    @Autowired
    private SysLogService sysLogService;

//    @PostMapping("/add")
//    public ResultVO add(@RequestBody SysLogEntity entity){
//        return sysLogService.add(entity);
//    }

//    @PutMapping("/edit")
//    public ResultVO edit(@RequestBody SysLogEntity entity){
//        return sysLogService.edit(entity);
//    }

//    @SysLog("查看日志列表")
    @ApiOperation(value = "查看日志列表")
    @RequiresPermissions({"log:list"})
    @GetMapping("/list")
    public SysResult list(PageResult request){
        return sysLogService.list(request);
    }

//    @DeleteMapping("/{id}")
//    public ResultVO deleteById(@PathVariable("id") Integer id){
//        return sysLogService.delById(id);
//    }
}
